<?php
//测试交易类
class test_class_order extends UnitTestCase{

	 function setUp(){
		 
		 $this->_CI =& get_instance();
		 $this->_CI->load->model( 'user_model' , '' , TRUE );   	 

		 $this->_CI->db->trans_begin();
		 //插入一个测试用用户
		 //已在数据库中添加了一个 id = 0 
		 $test_user_info =  array(
				 'user_id'=>0 ,
				 'nick'=>'just_for_test' ,
				 'email'=>'test@test.com' );

		 if( !$this->_CI->user_model->is_exists( $test_user_info ) ){
			 $this->_CI->user_model->add_new( 
				 array(
					 'user_id'=>0 ,
					 'nick'=>'just_for_test' ,
					 'email'=>'test@test.com' ) ); 
		 }
		  $this->_CI->db->trans_rollback();
	 }
	 function tearDown(){}

	 //测试添加一个新的交易信息到数据库中
	 function test_function_find(){	 
	 

		 
	 }
}

$test = new test_class_order();
$test->run( new HtmlReporter() );

